gadgetimage()

Description:
This will create a image gadget, in the specified window, and return itīs handle.
Please note that the handle variable must have the type handle: ".gadget"
assigned to it.
- A image gadget is a gadget with text, a surrounding border and an image, where the user,
by clicking in the gadget, can scroll the image.
Syntax:
Required syntax: |
| gadgethandle.gadget = gadgetimage( windowhandle , x , y , width , height , text$ , place , guidesign , font , imagehandle )
|
Optional syntax: |
| gadgethandle.gadget = gadgetimage( windowhandle , x , y , width , height , text$ , place , guidesign , font , imagehandle , [ framenumber ] , [ drag ] , [ imagexpos# ] , [ imageypos# ] , [ fit ] , [ help$ ] , [ scale ] , [ scalex ] , [ scaley ] , [ scalewidth ] , [ scaleheight ] , [ show ] , [ lock ] )
|
Parameters:
Required parameters |
Description |
|
| windowhandle | A handle to the window where the gadget will appear | |
| x | Horizontal position in used window | |
| y | Vertical position in used window | |
| width | total width of gadget in pixels | |
| height | total height of gadget in pixels | |
| text$ | A string containing the text displayed in/above/right/below or left for the gadget | |
| place | where to place text$: 0: In |
|
| guidesign | a handle to a previously created/loaded guidesign | |
| font | the font used to display the gadget | |
| imagehandle | a handle to a pre-loaded/created image(i.e. with LoadImage() or CreateImage() ), you want gadgetimage to display; | |
| Optional parameters | Description |
Default |
| framenumber | framenumber, in image, to display | 0 |
| drag | Boolean value to set if the user can drag the image (no drag = 0 / drag = 1) | 0 |
| imagexpos# | Where to place image in horizontal direction: if
imagexpos#<=1; else image is placed at pixels coordinates |
0.5 |
| imageypos# | Where to place image in vertical direction: if
imageypos#<=1; else image is placed at pixels coordinates |
0.5 |
| fit | boolean value to set if the image should be scaled to fit the width/height of the gadget | 0 |
| help$ | help string containing the help, displayed when user holds the cursor above gadget. | None or "" |
| scale | boolean value to set if gadget is scaled along with the window. (no scale = 0 / scale = 1) | 0 |
| scalex | boolean value to set if a gadgetīs x-pos is scaled, when gadget scaled (donīt scale = 0 / scale = 1) | 1 |
| scaley | boolean value to set if a gadgetīs y-pos is scaled, when gadget scaled (donīt scale = 0 / scale = 1) | 1 |
| scalewidth | boolean value to set if a gadgetīs width is scaled, when gadget scaled (donīt scale = 0 / scale = 1) | 1 |
| scaleheight | boolean value to set if a gadgetīs height is scaled, when gadget scaled (donīt scale = 0 / scale = 1) | 1 |
| show | boolean value to show/hide gadget. (hide = 0 / show = 1) | 1 |
| lock | boolean value to lock/unlock gadget; locked means: user cannot interact with gadget. (unlock = 0 / lock = 1) | 0 |
Returns:
A gadget handle for future gadget-reference
Example: